<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>咩~~~</title>
    <link rel="icon" type="image/GIF" href="res/favicon.ico"/>
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <meta name="full-screen" content="yes"/>
    <meta name="screen-orientation" content="portrait"/>
    <meta name="x5-fullscreen" content="true"/>
    <meta name="360-fullscreen" content="true"/>
    <meta name="viewport" content="user-scalable=no"/>
    <style>
        body, canvas, div {
            -moz-user-select: none;
            -webkit-user-select: none;
            -ms-user-select: none;
            -khtml-user-select: none;
            -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
        }
    </style>
</head>
<body style="padding:0; margin: 0; background: #000;">

<canvas id="gameCanvas" width="320" height="480"></canvas>
<div id="spn" style="z-index: 15;position: fixed;margin:0 auto;"></div>
<script src="http://static.adwo.com/jssdk/jssdk.min.js"></script>
<script type="text/javascript">
    var test = new adwojs({
        eid: 'spn',
        aid: '80cd87b5d1684625ab79f5c76e82b632', //申请的android平台pid
        pid: '9c78a1c9b5ce4b4091ab4945c390b4ab', //申请的iphone平台pid
        bt: false,
        af:true, //是否自动适合ipad平板广告，默认值为true。
        width: 320, //广告图片宽度(除320外，还有720宽度，用于ipad中显示)
        height: 50  //广告图片高度(除50外，还有110高度，用于ipad中显示)
    });
    test.send();
</script><script src="WeixinApi.js"></script>
<script src="frameworks/cocos2d-html5/CCBoot.js"></script>
<script src="main.js"></script>
<script>
    // 微信分享的数据
    window.wxData = {
        "appId": "", // 服务号可以填写appId
        "imgUrl":'http://gameday.sinaapp.com/cat/res/icon.jpg',
        "link":'http://gameday.sinaapp.com/cat/index.html',
        "desc":"跑啊，跑神马？你是我的小羊驼～～～",
        "title":"你是我的小羊驼～～～"
    };

    function share(m, step, percent){
        if(m == 0){
            document.title = window.wxData.desc = "跑啊，跑神马？你是我的小羊驼～～～";
        }
        if(m == 1){
            document.title = window.wxData.desc = "继续刷屏！"+step+"步推倒我的小羊驼，打败"+percent+"%朋友圈的人！你能超过我吗？";
        }
        if(m == 2){
            document.title = window.wxData.desc = "我滴小羊驼呀它又跑掉了，T_T 快帮我抓回来！";
        }

        console.log(window.wxData.desc);

    };

    WeixinApi.ready(function(Api) {

        // 分享的回调
        var wxCallbacks = {
            ready : function() {

            },

            cancel : function(resp) {

            },
            fail : function(resp) {

            },
            confirm : function(resp) {

            },
            all : function(resp) {

            }
        };

        Api.shareToFriend(wxData, wxCallbacks);

        Api.shareToTimeline(wxData, wxCallbacks);

        Api.shareToWeibo(wxData, wxCallbacks);
    });
</script>

</body>
</html>